let api = [];
const apiDocListSize = 8
api.push({
    name: '【common】公共接口',
    order: '1',
    list: []
})
api[0].list.push({
    alias: 'DynamicLogController',
    order: '1',
    link: '动态日志级别',
    desc: '动态日志级别',
    list: []
})
api[0].list[0].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/sys/log/dynamic/save',
    desc: '保存日志的级别',
});
api.push({
    name: '【bsms】系统管理服务',
    order: '2',
    list: []
})
api[1].list.push({
    alias: 'BsmsController',
    order: '1',
    link: 'feign_测试接口',
    desc: 'Feign 测试接口',
    list: []
})
api[1].list[0].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/feign/test',
    desc: '测试接口',
});
api[1].list[0].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/feign/test/trace',
    desc: '测试链路追踪',
});
api[1].list.push({
    alias: 'AuthController',
    order: '2',
    link: '授权接口',
    desc: '授权接口',
    list: []
})
api[1].list[1].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/login',
    desc: '登录',
});
api[1].list[1].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/logout',
    desc: '退出',
});
api[1].list[1].list.push({
    order: '3',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/token/check',
    desc: '检查 token',
});
api[1].list[1].list.push({
    order: '4',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/auth/check',
    desc: '检查授权信息',
});
api[1].list.push({
    alias: 'MiddlewareController',
    order: '3',
    link: '中间件接口',
    desc: '中间件接口',
    list: []
})
api[1].list[2].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/middleware',
    desc: '获取中间状态',
});
api[1].list.push({
    alias: 'SysController',
    order: '4',
    link: '验证码,文件上传,行政区划',
    desc: '验证码,文件上传,行政区划',
    list: []
})
api[1].list[3].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/alive',
    desc: '服务在线检查',
});
api[1].list[3].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/sys/file/upload',
    desc: '上传文件',
});
api[1].list[3].list.push({
    order: '3',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/sys/captcha/phone/send',
    desc: '发送短信验证码',
});
api[1].list[3].list.push({
    order: '4',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/sys/captcha/phone/consume',
    desc: '验证短信验证码',
});
api[1].list[3].list.push({
    order: '5',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/sys/captcha/img',
    desc: '获取图片验证码',
});
api[1].list[3].list.push({
    order: '6',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/sys/ad',
    desc: '根据[Code]获取下级行政区划',
});
api[1].list.push({
    alias: 'YuqueController',
    order: '5',
    link: '语雀接口',
    desc: '语雀接口',
    list: []
})
api[1].list[4].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/yuque/users',
    desc: '获取语雀用户',
});
api.push({
    name: '【Redis】Redis监控模块',
    order: '3',
    list: []
})
api[2].list.push({
    alias: 'GuardcatRedisController',
    order: '1',
    link: 'redis_信息接口',
    desc: 'Redis 信息接口',
    list: []
})
api[2].list[0].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/redis/info/list',
    desc: '获取 RedisInfo 信息(List格式)',
});
api[2].list[0].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/redis/info/map',
    desc: '获取 RedisInfo 信息(Map格式)',
});
api[2].list[0].list.push({
    order: '3',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/redis/slowlog',
    desc: '慢查询日志',
});
api.push({
    name: '【GuardCat】公共监控模块',
    order: '4',
    list: []
})
api[3].list.push({
    alias: 'AlertClientController',
    order: '1',
    link: '【client】警告测试',
    desc: '【Client】警告测试',
    list: []
})
api[3].list[0].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/client/alert/send',
    desc: '发送测试警告',
});
api[3].list.push({
    alias: 'GuardcatAppRelationController',
    order: '2',
    link: '【core】应用调用关系',
    desc: '【Core】应用调用关系',
    list: []
})
api[3].list[1].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/app/relation',
    desc: '应用调用关系信息',
});
api[3].list[1].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/app/relation',
    desc: '获取应用调用关系',
});
api[3].list.push({
    alias: 'GuardcatJvmController',
    order: '3',
    link: '【core】jvm信息',
    desc: '【Core】Jvm信息',
    list: []
})
api[3].list[2].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getOperatingSystemInfo',
    desc: '操作系统信息',
});
api[3].list[2].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getClassLoadingInfo',
    desc: '类加载信息',
});
api[3].list[2].list.push({
    order: '3',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getCompilerInfo',
    desc: '编译器信息',
});
api[3].list[2].list.push({
    order: '4',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getJvmInfo',
    desc: 'JVM信息',
});
api[3].list[2].list.push({
    order: '5',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getJvmProcessId',
    desc: 'JVM进程Id',
});
api[3].list[2].list.push({
    order: '6',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getHeapMemoryObjectStatistics',
    desc: 'JVM堆中对象统计信息',
});
api[3].list[2].list.push({
    order: '7',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/executeCommandByJcmd',
    desc: '通过 Jcmd 执行命令',
});
api[3].list[2].list.push({
    order: '8',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getSimpleJvmThreadInfo',
    desc: '简单的线程信息',
});
api[3].list[2].list.push({
    order: '9',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getFullThreadDumpMsg',
    desc: '所有线程堆栈信息',
});
api[3].list[2].list.push({
    order: '10',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getThreadMsgByThreadId',
    desc: '根据线程Id获取线程信息',
});
api[3].list[2].list.push({
    order: '11',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getAllThreadMsgSet',
    desc: '所有的线程信息',
});
api[3].list[2].list.push({
    order: '12',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getDeadlockedThreadMsgSet',
    desc: '所有死锁线程信息',
});
api[3].list[2].list.push({
    order: '13',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getMonitorDeadlockedThreadMsgSet',
    desc: '所有synchronized死锁线程',
});
api[3].list[2].list.push({
    order: '14',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getJvmMemoryInfo',
    desc: '堆/非堆信息',
});
api[3].list[2].list.push({
    order: '15',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getHeapMemoryUsageInfo',
    desc: '堆内存使用信息',
});
api[3].list[2].list.push({
    order: '16',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getNonHeapMemoryUsageInfo',
    desc: '非堆内存使用信息',
});
api[3].list[2].list.push({
    order: '17',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getCodeCacheMemoryUsageInfo',
    desc: 'JIT编译代码缓存区内存内存使用信息',
});
api[3].list[2].list.push({
    order: '18',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getMetaspaceMemoryUsageInfo',
    desc: '元空间内存使用信息',
});
api[3].list[2].list.push({
    order: '19',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getCompressedClassSpaceMemoryUsageInfo',
    desc: '类压缩数据区内存使用信息',
});
api[3].list[2].list.push({
    order: '20',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getEdenSpaceMemoryUsageInfo',
    desc: '新生代内存使用信息',
});
api[3].list[2].list.push({
    order: '21',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getSurvivorSpaceMemoryUsageInfo',
    desc: 'JVM幸存代内存使用信息',
});
api[3].list[2].list.push({
    order: '22',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getOldGenMemoryUsageInfo',
    desc: '老年代内存使用信息',
});
api[3].list[2].list.push({
    order: '23',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getMemoryInfo',
    desc: '所有的内存信息',
});
api[3].list[2].list.push({
    order: '24',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getBufferPoolInfo',
    desc: '缓冲池信息',
});
api[3].list[2].list.push({
    order: '25',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getGarbageCollectorInfos',
    desc: '垃圾收集器信息',
});
api[3].list[2].list.push({
    order: '26',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getTomcatServerInfos',
    desc: 'Tomcat服务器信息',
});
api[3].list[2].list.push({
    order: '27',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getTomcatGlobalRequestProcessorInfos',
    desc: 'Tomcat全局请求处理器监控信息',
});
api[3].list[2].list.push({
    order: '28',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getTomcatConnectorInfos',
    desc: 'Tomcat连接器监控信息',
});
api[3].list[2].list.push({
    order: '29',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getTomcatProtocolHandlerInfos',
    desc: 'Tomcat协议处理器监控信息',
});
api[3].list[2].list.push({
    order: '30',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getTomcatThreadPoolInfos',
    desc: 'Tomcat线程池监控信息',
});
api[3].list[2].list.push({
    order: '31',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getTomcatDispatcherServletInfos',
    desc: 'Tomcat中DispatcherServletInfo的监控',
});
api[3].list[2].list.push({
    order: '32',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getCustomThreadPoolInfos',
    desc: '获取自定义线程池的监控信息',
});
api[3].list[2].list.push({
    order: '33',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getApacheDubboThreadPoolInfos',
    desc: '获取Dubbo线程池监控',
});
api[3].list[2].list.push({
    order: '34',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/jvm/getDruidConnectionPoolInfo',
    desc: '获取Druid连接池信息',
});
api[3].list.push({
    alias: 'GuardcatMachineController',
    order: '4',
    link: '【core】机器硬件指标',
    desc: '【Core】机器硬件指标',
    list: []
})
api[3].list[3].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/machine/cpuAndMem',
    desc: '机器CPU与物理内存信息',
});
api[3].list[3].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/machine/hostName',
    desc: '机器名与IP',
});
api[3].list.push({
    alias: 'GuardcatRocketMqController',
    order: '5',
    link: '【core】rocket_信息',
    desc: '【Core】Rocket 信息',
    list: []
})
api[3].list[4].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/core/rocketmq/topics',
    desc: '所有TOPIC',
});
api[3].list.push({
    alias: 'AlertController',
    order: '6',
    link: '【server】警告',
    desc: '【Server】警告',
    list: []
})
api[3].list[5].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/server/alert/pages',
    desc: '警告列表',
});
api[3].list[5].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/server/alert/histogram',
    desc: '机器警告直方图',
});
api[3].list[5].list.push({
    order: '3',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/server/alert/add',
    desc: '新增警告规则',
});
api[3].list[5].list.push({
    order: '4',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/server/alert/read',
    desc: '警告设为已读',
});
api[3].list[5].list.push({
    order: '5',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/server/alert/count',
    desc: '机器的未读警告数',
});
api[3].list[5].list.push({
    order: '6',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/server/alert/test',
    desc: '测试警告',
});
api[3].list.push({
    alias: 'GuardcatAppController',
    order: '7',
    link: '【server】应用与机器信息',
    desc: '【Server】应用与机器信息',
    list: []
})
api[3].list[6].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/config',
    desc: '查询 Guardcat 配置',
});
api[3].list[6].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/apps',
    desc: '应用列表',
});
api[3].list[6].list.push({
    order: '3',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/apps/tree',
    desc: '应用与机器树状图',
});
api[3].list[6].list.push({
    order: '4',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/machine',
    desc: '查询机器详情',
});
api[3].list[6].list.push({
    order: '5',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/app',
    desc: '删除无效应用',
});
api[3].list[6].list.push({
    order: '6',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/machine',
    desc: '删除无效机器信息',
});
api[3].list.push({
    alias: 'GuardcatHeartbeatController',
    order: '8',
    link: '【server】心跳服务',
    desc: '【Server】心跳服务',
    list: []
})
api[3].list[7].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/heartbeat',
    desc: '接收客户端心跳',
});
api[3].list.push({
    alias: 'GuardcatMetricController',
    order: '9',
    link: '【server】机器内存信息',
    desc: '【Server】机器内存信息',
    list: []
})
api[3].list[8].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/jmm',
    desc: '机器内存信息',
});
api[3].list[8].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/jmm/echart/line',
    desc: '机器内存直方图',
});
api[3].list[8].list.push({
    order: '3',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/jmm',
    desc: '删除过期内存信息',
});
api[3].list[8].list.push({
    order: '4',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/physical',
    desc: '机器物理信息',
});
api[3].list[8].list.push({
    order: '5',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/gc',
    desc: '机器GC信息',
});
api[3].list[8].list.push({
    order: '6',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/gc/echart/line',
    desc: '机器GC折线图',
});
api[3].list[8].list.push({
    order: '7',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/thread/echart/line',
    desc: '线程信息折线图',
});
api[3].list[8].list.push({
    order: '8',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/download',
    desc: '快照下载',
});
api[3].list.push({
    alias: 'LogControllerInEs',
    order: '10',
    link: '【server】日志[es]',
    desc: '【Server】日志[ES]',
    list: []
})
api[3].list[9].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/log/analyze',
    desc: '分词功能',
});
api[3].list[9].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/log/log/page',
    desc: '搜索日志分页',
});
api[3].list[9].list.push({
    order: '3',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/log/log/chart/level/pie',
    desc: '日志饼图',
});
api[3].list[9].list.push({
    order: '4',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/log/log/chart/level/line',
    desc: '日志多轴折线图',
});
api[3].list[9].list.push({
    order: '5',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/log/log/source',
    desc: '查询索引原文',
});
api[3].list.push({
    alias: 'LogControllerInMySQL',
    order: '11',
    link: '【server】日志[mysql]',
    desc: '【Server】日志[MySQL]',
    list: []
})
api[3].list[10].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/log/analyze',
    desc: '分词功能',
});
api[3].list[10].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/log/page',
    desc: '日志分页搜索',
});
api[3].list[10].list.push({
    order: '3',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/log/chart/level/pie',
    desc: '日志饼图',
});
api[3].list[10].list.push({
    order: '4',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/log/chart/level/line',
    desc: '日志多轴折线图',
});
api[3].list[10].list.push({
    order: '5',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/log/source',
    desc: '查询索引原文',
});
api[3].list.push({
    alias: 'GuardcatSettingController',
    order: '12',
    link: '【server】警告配置',
    desc: '【Server】警告配置',
    list: []
})
api[3].list[11].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/server/alert/setting',
    desc: '应用的警告配置',
});
api[3].list[11].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/guardcat/server/alert/setting',
    desc: '保存警告配置',
});
api.push({
    name: '【Trackers】链路追踪模块',
    order: '5',
    list: []
})
api[4].list.push({
    alias: 'TrackerMetricController',
    order: '1',
    link: '链路追踪接口',
    desc: '链路追踪接口',
    list: []
})
api[4].list[0].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/tracker/metric',
    desc: '新增span信息',
});
api[4].list[0].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/tracker/metric/page',
    desc: '查询Trace分页列表',
});
api[4].list[0].list.push({
    order: '3',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/tracker/metric/page/termsTraceId',
    desc: '根据 traceId 分组聚合查询',
});
api[4].list[0].list.push({
    order: '4',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/tracker/metric/spans',
    desc: '根据 TraceId 查询 Span 列表',
});
api[4].list[0].list.push({
    order: '5',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/tracker/metric/spans/tree',
    desc: '根据 TraceId 查询 Span 树状列表',
});
api.push({
    name: '【Sentinel】流量监控模块',
    order: '6',
    list: []
})
api[5].list.push({
    alias: 'SentinelMetricController',
    order: '1',
    link: '流量监控【本地日志】',
    desc: '流量监控【本地日志】',
    list: []
})
api[5].list[0].list.push({
    order: '1',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/sentinel/clusterNode',
    desc: '资源列表',
});
api[5].list[0].list.push({
    order: '2',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/sentinel/resources',
    desc: '一天内被请求的资源列表',
});
api[5].list[0].list.push({
    order: '3',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/sentinel/metric',
    desc: '资源的监控信息',
});
api[5].list[0].list.push({
    order: '4',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/sentinel/metric/line',
    desc: '资源折线图',
});
api[5].list[0].list.push({
    order: '5',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/sentinel/metric/app',
    desc: '集群过去12小时的总体信息(__total_inbound_traffic__)',
});
api[5].list[0].list.push({
    order: '6',
    deprecated: 'false',
    url: 'http://127.0.0.1:19009/sentinel/cnode',
    desc: '资源的秒级, 分钟级指标信息',
});
api.push({
    name: '错误码列表',
    order: '7',
    list: []
})
api.push({
    name: '数据字典',
    order: '7',
    list: []
})
api[7].list.push({
    alias: '登录方式 [GrantType]',
    order: '1',
    link: '登录方式_[granttype]',
    desc: '登录方式 [GrantType]',
    list: []
})
api[7].list.push({
    alias: '是否,真假字典 [YesNo]',
    order: '2',
    link: '是否,真假字典_[yesno]',
    desc: '是否,真假字典 [YesNo]',
    list: []
})
document.onkeydown = keyDownSearch;
function keyDownSearch(e) {
    const theEvent = e;
    const code = theEvent.keyCode || theEvent.which || theEvent.charCode;
    if (code === 13) {
        const search = document.getElementById('search');
        const searchValue = search.value.toLocaleLowerCase();

        let searchGroup = [];
        for (let i = 0; i < api.length; i++) {

            let apiGroup = api[i];

            let searchArr = [];
            for (let i = 0; i < apiGroup.list.length; i++) {
                let apiData = apiGroup.list[i];
                const desc = apiData.desc;
                if (desc.toLocaleLowerCase().indexOf(searchValue) > -1) {
                    searchArr.push({
                        order: apiData.order,
                        desc: apiData.desc,
                        link: apiData.link,
                        list: apiData.list
                    });
                } else {
                    let methodList = apiData.list || [];
                    let methodListTemp = [];
                    for (let j = 0; j < methodList.length; j++) {
                        const methodData = methodList[j];
                        const methodDesc = methodData.desc;
                        if (methodDesc.toLocaleLowerCase().indexOf(searchValue) > -1) {
                            methodListTemp.push(methodData);
                            break;
                        }
                    }
                    if (methodListTemp.length > 0) {
                        const data = {
                            order: apiData.order,
                            desc: apiData.desc,
                            link: apiData.link,
                            list: methodListTemp
                        };
                        searchArr.push(data);
                    }
                }
            }
            if (apiGroup.name.toLocaleLowerCase().indexOf(searchValue) > -1) {
                searchGroup.push({
                    name: apiGroup.name,
                    order: apiGroup.order,
                    list: searchArr
                });
                continue;
            }
            if (searchArr.length === 0) {
                continue;
            }
            searchGroup.push({
                name: apiGroup.name,
                order: apiGroup.order,
                list: searchArr
            });
        }
        let html;
        if (searchValue === '') {
            const liClass = "";
            const display = "display: none";
            html = buildAccordion(api,liClass,display);
            document.getElementById('accordion').innerHTML = html;
        } else {
            const liClass = "open";
            const display = "display: block";
            html = buildAccordion(searchGroup,liClass,display);
            document.getElementById('accordion').innerHTML = html;
        }
        const Accordion = function (el, multiple) {
            this.el = el || {};
            this.multiple = multiple || false;
            const links = this.el.find('.dd');
            links.on('click', {el: this.el, multiple: this.multiple}, this.dropdown);
        };
        Accordion.prototype.dropdown = function (e) {
            const $el = e.data.el;
            let $this = $(this), $next = $this.next();
            $next.slideToggle();
            $this.parent().toggleClass('open');
            if (!e.data.multiple) {
                $el.find('.submenu').not($next).slideUp("20").parent().removeClass('open');
            }
        };
        new Accordion($('#accordion'), false);
    }
}

function buildAccordion(apiGroups, liClass, display) {
    let html = "";
    if (apiGroups.length > 0) {
        if (apiDocListSize === 1) {
            let apiData = apiGroups[0].list;
            let order = apiGroups[0].order;
            for (let j = 0; j < apiData.length; j++) {
                html += '<li class="'+liClass+'">';
                html += '<a class="dd" href="#_'+order+'_'+apiData[j].order+'_' + apiData[j].link + '">' + apiData[j].order + '.&nbsp;' + apiData[j].desc + '</a>';
                html += '<ul class="sectlevel2" style="'+display+'">';
                let doc = apiData[j].list;
                for (let m = 0; m < doc.length; m++) {
                    let spanString;
                    if (doc[m].deprecated === 'true') {
                        spanString='<span class="line-through">';
                    } else {
                        spanString='<span>';
                    }
                    html += '<li><a href="#_'+order+'_' + apiData[j].order + '_' + doc[m].order + '_' + doc[m].desc + '">' + apiData[j].order + '.' + doc[m].order + '.&nbsp;' + spanString + doc[m].desc + '<span></a> </li>';
                }
                html += '</ul>';
                html += '</li>';
            }
        } else {
            for (let i = 0; i < apiGroups.length; i++) {
                let apiGroup = apiGroups[i];
                html += '<li class="'+liClass+'">';
                html += '<a class="dd" href="#_'+apiGroup.order+'_' + apiGroup.name + '">' + apiGroup.order + '.&nbsp;' + apiGroup.name + '</a>';
                html += '<ul class="sectlevel1">';

                let apiData = apiGroup.list;
                for (let j = 0; j < apiData.length; j++) {
                    html += '<li class="'+liClass+'">';
                    html += '<a class="dd" href="#_'+apiGroup.order+'_'+ apiData[j].order + '_'+ apiData[j].link + '">' +apiGroup.order+'.'+ apiData[j].order + '.&nbsp;' + apiData[j].desc + '</a>';
                    html += '<ul class="sectlevel2" style="'+display+'">';
                    let doc = apiData[j].list;
                    for (let m = 0; m < doc.length; m++) {
                       let spanString;
                       if (doc[m].deprecated === 'true') {
                           spanString='<span class="line-through">';
                       } else {
                           spanString='<span>';
                       }
                       html += '<li><a href="#_'+apiGroup.order+'_' + apiData[j].order + '_' + doc[m].order + '_' + doc[m].desc + '">'+apiGroup.order+'.' + apiData[j].order + '.' + doc[m].order + '.&nbsp;' + spanString + doc[m].desc + '<span></a> </li>';
                   }
                    html += '</ul>';
                    html += '</li>';
                }

                html += '</ul>';
                html += '</li>';
            }
        }
    }
    return html;
}